3.4.94 \(\int x (d+e x^r)^3 (a+b \log (c x^n)) \, dx\) [394]

Optimal. Leaf size=149 \[ -\frac {1}{4} b d^3 n x^2-\frac {3 b d e^2 n x^{2 (1+r)}}{4 (1+r)^2}-\frac {3 b d^2 e n x^{2+r}}{(2+r)^2}-\frac {b e^3 n x^{2+3 r}}{(2+3 r)^2}+\frac {1}{2} \left (d^3 x^2+\frac {3 d e^2 x^{2 (1+r)}}{1+r}+\frac {6 d^2 e x^{2+r}}{2+r}+\frac {2 e^3 x^{2+3 r}}{2+3 r}\right ) \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/4*b*d^3*n*x^2-3/4*b*d*e^2*n*x^(2+2*r)/(1+r)^2-3*b*d^2*e*n*x^(2+r)/(2+r)^2-b*e^3*n*x^(2+3*r)/(2+3*r)^2+1/2*(
d^3*x^2+3*d*e^2*x^(2+2*r)/(1+r)+6*d^2*e*x^(2+r)/(2+r)+2*e^3*x^(2+3*r)/(2+3*r))*(a+b*ln(c*x^n))

________________________________________________________________________________________

Rubi [A]
time = 0.24, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {276, 2371, 12, 14} \begin {gather*} \frac {1}{2} \left (d^3 x^2+\frac {6 d^2 e x^{r+2}}{r+2}+\frac {3 d e^2 x^{2 (r+1)}}{r+1}+\frac {2 e^3 x^{3 r+2}}{3 r+2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d^3 n x^2-\frac {3 b d^2 e n x^{r+2}}{(r+2)^2}-\frac {3 b d e^2 n x^{2 (r+1)}}{4 (r+1)^2}-\frac {b e^3 n x^{3 r+2}}{(3 r+2)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(d + e*x^r)^3*(a + b*Log[c*x^n]),x]

[Out]

-1/4*(b*d^3*n*x^2) - (3*b*d*e^2*n*x^(2*(1 + r)))/(4*(1 + r)^2) - (3*b*d^2*e*n*x^(2 + r))/(2 + r)^2 - (b*e^3*n*
x^(2 + 3*r))/(2 + 3*r)^2 + ((d^3*x^2 + (3*d*e^2*x^(2*(1 + r)))/(1 + r) + (6*d^2*e*x^(2 + r))/(2 + r) + (2*e^3*
x^(2 + 3*r))/(2 + 3*r))*(a + b*Log[c*x^n]))/2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2371

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int x \left (d+e x^r\right )^3 \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {1}{2} \left (d^3 x^2+\frac {3 d e^2 x^{2 (1+r)}}{1+r}+\frac {6 d^2 e x^{2+r}}{2+r}+\frac {2 e^3 x^{2+3 r}}{2+3 r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {1}{2} x \left (d^3+\frac {6 d^2 e x^r}{2+r}+\frac {3 d e^2 x^{2 r}}{1+r}+\frac {2 e^3 x^{3 r}}{2+3 r}\right ) \, dx\\ &=\frac {1}{2} \left (d^3 x^2+\frac {3 d e^2 x^{2 (1+r)}}{1+r}+\frac {6 d^2 e x^{2+r}}{2+r}+\frac {2 e^3 x^{2+3 r}}{2+3 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} (b n) \int x \left (d^3+\frac {6 d^2 e x^r}{2+r}+\frac {3 d e^2 x^{2 r}}{1+r}+\frac {2 e^3 x^{3 r}}{2+3 r}\right ) \, dx\\ &=\frac {1}{2} \left (d^3 x^2+\frac {3 d e^2 x^{2 (1+r)}}{1+r}+\frac {6 d^2 e x^{2+r}}{2+r}+\frac {2 e^3 x^{2+3 r}}{2+3 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} (b n) \int \left (d^3 x+\frac {6 d^2 e x^{1+r}}{2+r}+\frac {3 d e^2 x^{1+2 r}}{1+r}+\frac {2 e^3 x^{1+3 r}}{2+3 r}\right ) \, dx\\ &=-\frac {1}{4} b d^3 n x^2-\frac {3 b d e^2 n x^{2 (1+r)}}{4 (1+r)^2}-\frac {3 b d^2 e n x^{2+r}}{(2+r)^2}-\frac {b e^3 n x^{2+3 r}}{(2+3 r)^2}+\frac {1}{2} \left (d^3 x^2+\frac {3 d e^2 x^{2 (1+r)}}{1+r}+\frac {6 d^2 e x^{2+r}}{2+r}+\frac {2 e^3 x^{2+3 r}}{2+3 r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.16, size = 160, normalized size = 1.07 \begin {gather*} \frac {1}{4} x^2 \left (2 b d^3 n \log (x)+d^3 \left (2 a-b n-2 b n \log (x)+2 b \log \left (c x^n\right )\right )+\frac {3 d e^2 x^{2 r} \left (-b n+2 a (1+r)+2 b (1+r) \log \left (c x^n\right )\right )}{(1+r)^2}+\frac {12 d^2 e x^r \left (-b n+a (2+r)+b (2+r) \log \left (c x^n\right )\right )}{(2+r)^2}+\frac {4 e^3 x^{3 r} \left (-b n+a (2+3 r)+b (2+3 r) \log \left (c x^n\right )\right )}{(2+3 r)^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(d + e*x^r)^3*(a + b*Log[c*x^n]),x]

[Out]

(x^2*(2*b*d^3*n*Log[x] + d^3*(2*a - b*n - 2*b*n*Log[x] + 2*b*Log[c*x^n]) + (3*d*e^2*x^(2*r)*(-(b*n) + 2*a*(1 +
 r) + 2*b*(1 + r)*Log[c*x^n]))/(1 + r)^2 + (12*d^2*e*x^r*(-(b*n) + a*(2 + r) + b*(2 + r)*Log[c*x^n]))/(2 + r)^
2 + (4*e^3*x^(3*r)*(-(b*n) + a*(2 + 3*r) + b*(2 + 3*r)*Log[c*x^n]))/(2 + 3*r)^2))/4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.26, size = 4027, normalized size = 27.03

method result size
risch \(\text {Expression too large to display}\) \(4027\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(d+e*x^r)^3*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/2*b*x^2*(2*e^3*r^2*(x^r)^3+9*d*e^2*r^2*(x^r)^2+6*e^3*r*(x^r)^3+3*d^3*r^3+18*d^2*e*r^2*x^r+24*d*e^2*r*(x^r)^2
+4*e^3*(x^r)^3+11*d^3*r^2+30*d^2*e*r*x^r+12*d*e^2*(x^r)^2+12*d^3*r+12*d^2*e*x^r+4*d^3)/(2+3*r)/(1+r)/(2+r)*ln(
x^n)-1/4*x^2*(-32*e^3*(x^r)^3*a-96*d^2*e*x^r*a-96*d*e^2*(x^r)^2*a+360*b*d^2*e*n*r^3*x^r-912*ln(c)*b*d*e^2*r^2*
(x^r)^2-480*ln(c)*b*d*e^2*r*(x^r)^2+72*I*Pi*b*e^3*r*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*(x^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*(x^r
)^3+240*I*Pi*b*d*e^2*r*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*(x^r)^2+264*I*Pi*b*d^2*e*r*csgn(I*c)*csgn(I*x^n)*cs
gn(I*c*x^n)*x^r+171*I*Pi*b*d*e^2*r^4*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*(x^r)^2-48*I*Pi*b*d^2*e*csgn(I*x^n)*c
sgn(I*c*x^n)^2*x^r+193*I*Pi*b*d^3*r^4*csgn(I*c)...

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 222, normalized size = 1.49 \begin {gather*} -\frac {1}{4} \, b d^{3} n x^{2} + \frac {1}{2} \, b d^{3} x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a d^{3} x^{2} + \frac {b e^{3} x^{3 \, r + 2} \log \left (c x^{n}\right )}{3 \, r + 2} + \frac {3 \, b d e^{2} x^{2 \, r + 2} \log \left (c x^{n}\right )}{2 \, {\left (r + 1\right )}} + \frac {3 \, b d^{2} e x^{r + 2} \log \left (c x^{n}\right )}{r + 2} - \frac {b e^{3} n x^{3 \, r + 2}}{{\left (3 \, r + 2\right )}^{2}} + \frac {a e^{3} x^{3 \, r + 2}}{3 \, r + 2} - \frac {3 \, b d e^{2} n x^{2 \, r + 2}}{4 \, {\left (r + 1\right )}^{2}} + \frac {3 \, a d e^{2} x^{2 \, r + 2}}{2 \, {\left (r + 1\right )}} - \frac {3 \, b d^{2} e n x^{r + 2}}{{\left (r + 2\right )}^{2}} + \frac {3 \, a d^{2} e x^{r + 2}}{r + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+e*x^r)^3*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/4*b*d^3*n*x^2 + 1/2*b*d^3*x^2*log(c*x^n) + 1/2*a*d^3*x^2 + b*e^3*x^(3*r + 2)*log(c*x^n)/(3*r + 2) + 3/2*b*d
*e^2*x^(2*r + 2)*log(c*x^n)/(r + 1) + 3*b*d^2*e*x^(r + 2)*log(c*x^n)/(r + 2) - b*e^3*n*x^(3*r + 2)/(3*r + 2)^2
 + a*e^3*x^(3*r + 2)/(3*r + 2) - 3/4*b*d*e^2*n*x^(2*r + 2)/(r + 1)^2 + 3/2*a*d*e^2*x^(2*r + 2)/(r + 1) - 3*b*d
^2*e*n*x^(r + 2)/(r + 2)^2 + 3*a*d^2*e*x^(r + 2)/(r + 2)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 881 vs. \(2 (141) = 282\).
time = 0.38, size = 881, normalized size = 5.91 \begin {gather*} \frac {2 \, {\left (9 \, b d^{3} r^{6} + 66 \, b d^{3} r^{5} + 193 \, b d^{3} r^{4} + 288 \, b d^{3} r^{3} + 232 \, b d^{3} r^{2} + 96 \, b d^{3} r + 16 \, b d^{3}\right )} x^{2} \log \left (c\right ) + 2 \, {\left (9 \, b d^{3} n r^{6} + 66 \, b d^{3} n r^{5} + 193 \, b d^{3} n r^{4} + 288 \, b d^{3} n r^{3} + 232 \, b d^{3} n r^{2} + 96 \, b d^{3} n r + 16 \, b d^{3} n\right )} x^{2} \log \left (x\right ) - {\left (9 \, {\left (b d^{3} n - 2 \, a d^{3}\right )} r^{6} + 66 \, {\left (b d^{3} n - 2 \, a d^{3}\right )} r^{5} + 16 \, b d^{3} n + 193 \, {\left (b d^{3} n - 2 \, a d^{3}\right )} r^{4} - 32 \, a d^{3} + 288 \, {\left (b d^{3} n - 2 \, a d^{3}\right )} r^{3} + 232 \, {\left (b d^{3} n - 2 \, a d^{3}\right )} r^{2} + 96 \, {\left (b d^{3} n - 2 \, a d^{3}\right )} r\right )} x^{2} + 4 \, {\left ({\left (3 \, b r^{5} + 20 \, b r^{4} + 51 \, b r^{3} + 62 \, b r^{2} + 36 \, b r + 8 \, b\right )} x^{2} e^{3} \log \left (c\right ) + {\left (3 \, b n r^{5} + 20 \, b n r^{4} + 51 \, b n r^{3} + 62 \, b n r^{2} + 36 \, b n r + 8 \, b n\right )} x^{2} e^{3} \log \left (x\right ) + {\left (3 \, a r^{5} - {\left (b n - 20 \, a\right )} r^{4} - 3 \, {\left (2 \, b n - 17 \, a\right )} r^{3} - {\left (13 \, b n - 62 \, a\right )} r^{2} - 4 \, b n - 12 \, {\left (b n - 3 \, a\right )} r + 8 \, a\right )} x^{2} e^{3}\right )} x^{3 \, r} + 3 \, {\left (2 \, {\left (9 \, b d r^{5} + 57 \, b d r^{4} + 136 \, b d r^{3} + 152 \, b d r^{2} + 80 \, b d r + 16 \, b d\right )} x^{2} e^{2} \log \left (c\right ) + 2 \, {\left (9 \, b d n r^{5} + 57 \, b d n r^{4} + 136 \, b d n r^{3} + 152 \, b d n r^{2} + 80 \, b d n r + 16 \, b d n\right )} x^{2} e^{2} \log \left (x\right ) + {\left (18 \, a d r^{5} - 3 \, {\left (3 \, b d n - 38 \, a d\right )} r^{4} - 16 \, {\left (3 \, b d n - 17 \, a d\right )} r^{3} - 16 \, b d n - 8 \, {\left (11 \, b d n - 38 \, a d\right )} r^{2} + 32 \, a d - 32 \, {\left (2 \, b d n - 5 \, a d\right )} r\right )} x^{2} e^{2}\right )} x^{2 \, r} + 12 \, {\left ({\left (9 \, b d^{2} r^{5} + 48 \, b d^{2} r^{4} + 97 \, b d^{2} r^{3} + 94 \, b d^{2} r^{2} + 44 \, b d^{2} r + 8 \, b d^{2}\right )} x^{2} e \log \left (c\right ) + {\left (9 \, b d^{2} n r^{5} + 48 \, b d^{2} n r^{4} + 97 \, b d^{2} n r^{3} + 94 \, b d^{2} n r^{2} + 44 \, b d^{2} n r + 8 \, b d^{2} n\right )} x^{2} e \log \left (x\right ) + {\left (9 \, a d^{2} r^{5} - 3 \, {\left (3 \, b d^{2} n - 16 \, a d^{2}\right )} r^{4} - 4 \, b d^{2} n - {\left (30 \, b d^{2} n - 97 \, a d^{2}\right )} r^{3} + 8 \, a d^{2} - {\left (37 \, b d^{2} n - 94 \, a d^{2}\right )} r^{2} - 4 \, {\left (5 \, b d^{2} n - 11 \, a d^{2}\right )} r\right )} x^{2} e\right )} x^{r}}{4 \, {\left (9 \, r^{6} + 66 \, r^{5} + 193 \, r^{4} + 288 \, r^{3} + 232 \, r^{2} + 96 \, r + 16\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+e*x^r)^3*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/4*(2*(9*b*d^3*r^6 + 66*b*d^3*r^5 + 193*b*d^3*r^4 + 288*b*d^3*r^3 + 232*b*d^3*r^2 + 96*b*d^3*r + 16*b*d^3)*x^
2*log(c) + 2*(9*b*d^3*n*r^6 + 66*b*d^3*n*r^5 + 193*b*d^3*n*r^4 + 288*b*d^3*n*r^3 + 232*b*d^3*n*r^2 + 96*b*d^3*
n*r + 16*b*d^3*n)*x^2*log(x) - (9*(b*d^3*n - 2*a*d^3)*r^6 + 66*(b*d^3*n - 2*a*d^3)*r^5 + 16*b*d^3*n + 193*(b*d
^3*n - 2*a*d^3)*r^4 - 32*a*d^3 + 288*(b*d^3*n - 2*a*d^3)*r^3 + 232*(b*d^3*n - 2*a*d^3)*r^2 + 96*(b*d^3*n - 2*a
*d^3)*r)*x^2 + 4*((3*b*r^5 + 20*b*r^4 + 51*b*r^3 + 62*b*r^2 + 36*b*r + 8*b)*x^2*e^3*log(c) + (3*b*n*r^5 + 20*b
*n*r^4 + 51*b*n*r^3 + 62*b*n*r^2 + 36*b*n*r + 8*b*n)*x^2*e^3*log(x) + (3*a*r^5 - (b*n - 20*a)*r^4 - 3*(2*b*n -
 17*a)*r^3 - (13*b*n - 62*a)*r^2 - 4*b*n - 12*(b*n - 3*a)*r + 8*a)*x^2*e^3)*x^(3*r) + 3*(2*(9*b*d*r^5 + 57*b*d
*r^4 + 136*b*d*r^3 + 152*b*d*r^2 + 80*b*d*r + 16*b*d)*x^2*e^2*log(c) + 2*(9*b*d*n*r^5 + 57*b*d*n*r^4 + 136*b*d
*n*r^3 + 152*b*d*n*r^2 + 80*b*d*n*r + 16*b*d*n)*x^2*e^2*log(x) + (18*a*d*r^5 - 3*(3*b*d*n - 38*a*d)*r^4 - 16*(
3*b*d*n - 17*a*d)*r^3 - 16*b*d*n - 8*(11*b*d*n - 38*a*d)*r^2 + 32*a*d - 32*(2*b*d*n - 5*a*d)*r)*x^2*e^2)*x^(2*
r) + 12*((9*b*d^2*r^5 + 48*b*d^2*r^4 + 97*b*d^2*r^3 + 94*b*d^2*r^2 + 44*b*d^2*r + 8*b*d^2)*x^2*e*log(c) + (9*b
*d^2*n*r^5 + 48*b*d^2*n*r^4 + 97*b*d^2*n*r^3 + 94*b*d^2*n*r^2 + 44*b*d^2*n*r + 8*b*d^2*n)*x^2*e*log(x) + (9*a*
d^2*r^5 - 3*(3*b*d^2*n - 16*a*d^2)*r^4 - 4*b*d^2*n - (30*b*d^2*n - 97*a*d^2)*r^3 + 8*a*d^2 - (37*b*d^2*n - 94*
a*d^2)*r^2 - 4*(5*b*d^2*n - 11*a*d^2)*r)*x^2*e)*x^r)/(9*r^6 + 66*r^5 + 193*r^4 + 288*r^3 + 232*r^2 + 96*r + 16
)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+e*x**r)**3*(a+b*ln(c*x**n)),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3061 deep

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1588 vs. \(2 (141) = 282\).
time = 1.95, size = 1588, normalized size = 10.66 \begin {gather*} \frac {18 \, b d^{3} n r^{6} x^{2} \log \left (x\right ) + 108 \, b d^{2} n r^{5} x^{2} x^{r} e \log \left (x\right ) - 9 \, b d^{3} n r^{6} x^{2} + 18 \, b d^{3} r^{6} x^{2} \log \left (c\right ) + 108 \, b d^{2} r^{5} x^{2} x^{r} e \log \left (c\right ) + 132 \, b d^{3} n r^{5} x^{2} \log \left (x\right ) + 54 \, b d n r^{5} x^{2} x^{2 \, r} e^{2} \log \left (x\right ) + 576 \, b d^{2} n r^{4} x^{2} x^{r} e \log \left (x\right ) - 66 \, b d^{3} n r^{5} x^{2} + 18 \, a d^{3} r^{6} x^{2} - 108 \, b d^{2} n r^{4} x^{2} x^{r} e + 108 \, a d^{2} r^{5} x^{2} x^{r} e + 132 \, b d^{3} r^{5} x^{2} \log \left (c\right ) + 54 \, b d r^{5} x^{2} x^{2 \, r} e^{2} \log \left (c\right ) + 576 \, b d^{2} r^{4} x^{2} x^{r} e \log \left (c\right ) + 386 \, b d^{3} n r^{4} x^{2} \log \left (x\right ) + 12 \, b n r^{5} x^{2} x^{3 \, r} e^{3} \log \left (x\right ) + 342 \, b d n r^{4} x^{2} x^{2 \, r} e^{2} \log \left (x\right ) + 1164 \, b d^{2} n r^{3} x^{2} x^{r} e \log \left (x\right ) - 193 \, b d^{3} n r^{4} x^{2} + 132 \, a d^{3} r^{5} x^{2} - 27 \, b d n r^{4} x^{2} x^{2 \, r} e^{2} + 54 \, a d r^{5} x^{2} x^{2 \, r} e^{2} - 360 \, b d^{2} n r^{3} x^{2} x^{r} e + 576 \, a d^{2} r^{4} x^{2} x^{r} e + 386 \, b d^{3} r^{4} x^{2} \log \left (c\right ) + 12 \, b r^{5} x^{2} x^{3 \, r} e^{3} \log \left (c\right ) + 342 \, b d r^{4} x^{2} x^{2 \, r} e^{2} \log \left (c\right ) + 1164 \, b d^{2} r^{3} x^{2} x^{r} e \log \left (c\right ) + 576 \, b d^{3} n r^{3} x^{2} \log \left (x\right ) + 80 \, b n r^{4} x^{2} x^{3 \, r} e^{3} \log \left (x\right ) + 816 \, b d n r^{3} x^{2} x^{2 \, r} e^{2} \log \left (x\right ) + 1128 \, b d^{2} n r^{2} x^{2} x^{r} e \log \left (x\right ) - 288 \, b d^{3} n r^{3} x^{2} + 386 \, a d^{3} r^{4} x^{2} - 4 \, b n r^{4} x^{2} x^{3 \, r} e^{3} + 12 \, a r^{5} x^{2} x^{3 \, r} e^{3} - 144 \, b d n r^{3} x^{2} x^{2 \, r} e^{2} + 342 \, a d r^{4} x^{2} x^{2 \, r} e^{2} - 444 \, b d^{2} n r^{2} x^{2} x^{r} e + 1164 \, a d^{2} r^{3} x^{2} x^{r} e + 576 \, b d^{3} r^{3} x^{2} \log \left (c\right ) + 80 \, b r^{4} x^{2} x^{3 \, r} e^{3} \log \left (c\right ) + 816 \, b d r^{3} x^{2} x^{2 \, r} e^{2} \log \left (c\right ) + 1128 \, b d^{2} r^{2} x^{2} x^{r} e \log \left (c\right ) + 464 \, b d^{3} n r^{2} x^{2} \log \left (x\right ) + 204 \, b n r^{3} x^{2} x^{3 \, r} e^{3} \log \left (x\right ) + 912 \, b d n r^{2} x^{2} x^{2 \, r} e^{2} \log \left (x\right ) + 528 \, b d^{2} n r x^{2} x^{r} e \log \left (x\right ) - 232 \, b d^{3} n r^{2} x^{2} + 576 \, a d^{3} r^{3} x^{2} - 24 \, b n r^{3} x^{2} x^{3 \, r} e^{3} + 80 \, a r^{4} x^{2} x^{3 \, r} e^{3} - 264 \, b d n r^{2} x^{2} x^{2 \, r} e^{2} + 816 \, a d r^{3} x^{2} x^{2 \, r} e^{2} - 240 \, b d^{2} n r x^{2} x^{r} e + 1128 \, a d^{2} r^{2} x^{2} x^{r} e + 464 \, b d^{3} r^{2} x^{2} \log \left (c\right ) + 204 \, b r^{3} x^{2} x^{3 \, r} e^{3} \log \left (c\right ) + 912 \, b d r^{2} x^{2} x^{2 \, r} e^{2} \log \left (c\right ) + 528 \, b d^{2} r x^{2} x^{r} e \log \left (c\right ) + 192 \, b d^{3} n r x^{2} \log \left (x\right ) + 248 \, b n r^{2} x^{2} x^{3 \, r} e^{3} \log \left (x\right ) + 480 \, b d n r x^{2} x^{2 \, r} e^{2} \log \left (x\right ) + 96 \, b d^{2} n x^{2} x^{r} e \log \left (x\right ) - 96 \, b d^{3} n r x^{2} + 464 \, a d^{3} r^{2} x^{2} - 52 \, b n r^{2} x^{2} x^{3 \, r} e^{3} + 204 \, a r^{3} x^{2} x^{3 \, r} e^{3} - 192 \, b d n r x^{2} x^{2 \, r} e^{2} + 912 \, a d r^{2} x^{2} x^{2 \, r} e^{2} - 48 \, b d^{2} n x^{2} x^{r} e + 528 \, a d^{2} r x^{2} x^{r} e + 192 \, b d^{3} r x^{2} \log \left (c\right ) + 248 \, b r^{2} x^{2} x^{3 \, r} e^{3} \log \left (c\right ) + 480 \, b d r x^{2} x^{2 \, r} e^{2} \log \left (c\right ) + 96 \, b d^{2} x^{2} x^{r} e \log \left (c\right ) + 32 \, b d^{3} n x^{2} \log \left (x\right ) + 144 \, b n r x^{2} x^{3 \, r} e^{3} \log \left (x\right ) + 96 \, b d n x^{2} x^{2 \, r} e^{2} \log \left (x\right ) - 16 \, b d^{3} n x^{2} + 192 \, a d^{3} r x^{2} - 48 \, b n r x^{2} x^{3 \, r} e^{3} + 248 \, a r^{2} x^{2} x^{3 \, r} e^{3} - 48 \, b d n x^{2} x^{2 \, r} e^{2} + 480 \, a d r x^{2} x^{2 \, r} e^{2} + 96 \, a d^{2} x^{2} x^{r} e + 32 \, b d^{3} x^{2} \log \left (c\right ) + 144 \, b r x^{2} x^{3 \, r} e^{3} \log \left (c\right ) + 96 \, b d x^{2} x^{2 \, r} e^{2} \log \left (c\right ) + 32 \, b n x^{2} x^{3 \, r} e^{3} \log \left (x\right ) + 32 \, a d^{3} x^{2} - 16 \, b n x^{2} x^{3 \, r} e^{3} + 144 \, a r x^{2} x^{3 \, r} e^{3} + 96 \, a d x^{2} x^{2 \, r} e^{2} + 32 \, b x^{2} x^{3 \, r} e^{3} \log \left (c\right ) + 32 \, a x^{2} x^{3 \, r} e^{3}}{4 \, {\left (9 \, r^{6} + 66 \, r^{5} + 193 \, r^{4} + 288 \, r^{3} + 232 \, r^{2} + 96 \, r + 16\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+e*x^r)^3*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/4*(18*b*d^3*n*r^6*x^2*log(x) + 108*b*d^2*n*r^5*x^2*x^r*e*log(x) - 9*b*d^3*n*r^6*x^2 + 18*b*d^3*r^6*x^2*log(c
) + 108*b*d^2*r^5*x^2*x^r*e*log(c) + 132*b*d^3*n*r^5*x^2*log(x) + 54*b*d*n*r^5*x^2*x^(2*r)*e^2*log(x) + 576*b*
d^2*n*r^4*x^2*x^r*e*log(x) - 66*b*d^3*n*r^5*x^2 + 18*a*d^3*r^6*x^2 - 108*b*d^2*n*r^4*x^2*x^r*e + 108*a*d^2*r^5
*x^2*x^r*e + 132*b*d^3*r^5*x^2*log(c) + 54*b*d*r^5*x^2*x^(2*r)*e^2*log(c) + 576*b*d^2*r^4*x^2*x^r*e*log(c) + 3
86*b*d^3*n*r^4*x^2*log(x) + 12*b*n*r^5*x^2*x^(3*r)*e^3*log(x) + 342*b*d*n*r^4*x^2*x^(2*r)*e^2*log(x) + 1164*b*
d^2*n*r^3*x^2*x^r*e*log(x) - 193*b*d^3*n*r^4*x^2 + 132*a*d^3*r^5*x^2 - 27*b*d*n*r^4*x^2*x^(2*r)*e^2 + 54*a*d*r
^5*x^2*x^(2*r)*e^2 - 360*b*d^2*n*r^3*x^2*x^r*e + 576*a*d^2*r^4*x^2*x^r*e + 386*b*d^3*r^4*x^2*log(c) + 12*b*r^5
*x^2*x^(3*r)*e^3*log(c) + 342*b*d*r^4*x^2*x^(2*r)*e^2*log(c) + 1164*b*d^2*r^3*x^2*x^r*e*log(c) + 576*b*d^3*n*r
^3*x^2*log(x) + 80*b*n*r^4*x^2*x^(3*r)*e^3*log(x) + 816*b*d*n*r^3*x^2*x^(2*r)*e^2*log(x) + 1128*b*d^2*n*r^2*x^
2*x^r*e*log(x) - 288*b*d^3*n*r^3*x^2 + 386*a*d^3*r^4*x^2 - 4*b*n*r^4*x^2*x^(3*r)*e^3 + 12*a*r^5*x^2*x^(3*r)*e^
3 - 144*b*d*n*r^3*x^2*x^(2*r)*e^2 + 342*a*d*r^4*x^2*x^(2*r)*e^2 - 444*b*d^2*n*r^2*x^2*x^r*e + 1164*a*d^2*r^3*x
^2*x^r*e + 576*b*d^3*r^3*x^2*log(c) + 80*b*r^4*x^2*x^(3*r)*e^3*log(c) + 816*b*d*r^3*x^2*x^(2*r)*e^2*log(c) + 1
128*b*d^2*r^2*x^2*x^r*e*log(c) + 464*b*d^3*n*r^2*x^2*log(x) + 204*b*n*r^3*x^2*x^(3*r)*e^3*log(x) + 912*b*d*n*r
^2*x^2*x^(2*r)*e^2*log(x) + 528*b*d^2*n*r*x^2*x^r*e*log(x) - 232*b*d^3*n*r^2*x^2 + 576*a*d^3*r^3*x^2 - 24*b*n*
r^3*x^2*x^(3*r)*e^3 + 80*a*r^4*x^2*x^(3*r)*e^3 - 264*b*d*n*r^2*x^2*x^(2*r)*e^2 + 816*a*d*r^3*x^2*x^(2*r)*e^2 -
 240*b*d^2*n*r*x^2*x^r*e + 1128*a*d^2*r^2*x^2*x^r*e + 464*b*d^3*r^2*x^2*log(c) + 204*b*r^3*x^2*x^(3*r)*e^3*log
(c) + 912*b*d*r^2*x^2*x^(2*r)*e^2*log(c) + 528*b*d^2*r*x^2*x^r*e*log(c) + 192*b*d^3*n*r*x^2*log(x) + 248*b*n*r
^2*x^2*x^(3*r)*e^3*log(x) + 480*b*d*n*r*x^2*x^(2*r)*e^2*log(x) + 96*b*d^2*n*x^2*x^r*e*log(x) - 96*b*d^3*n*r*x^
2 + 464*a*d^3*r^2*x^2 - 52*b*n*r^2*x^2*x^(3*r)*e^3 + 204*a*r^3*x^2*x^(3*r)*e^3 - 192*b*d*n*r*x^2*x^(2*r)*e^2 +
 912*a*d*r^2*x^2*x^(2*r)*e^2 - 48*b*d^2*n*x^2*x^r*e + 528*a*d^2*r*x^2*x^r*e + 192*b*d^3*r*x^2*log(c) + 248*b*r
^2*x^2*x^(3*r)*e^3*log(c) + 480*b*d*r*x^2*x^(2*r)*e^2*log(c) + 96*b*d^2*x^2*x^r*e*log(c) + 32*b*d^3*n*x^2*log(
x) + 144*b*n*r*x^2*x^(3*r)*e^3*log(x) + 96*b*d*n*x^2*x^(2*r)*e^2*log(x) - 16*b*d^3*n*x^2 + 192*a*d^3*r*x^2 - 4
8*b*n*r*x^2*x^(3*r)*e^3 + 248*a*r^2*x^2*x^(3*r)*e^3 - 48*b*d*n*x^2*x^(2*r)*e^2 + 480*a*d*r*x^2*x^(2*r)*e^2 + 9
6*a*d^2*x^2*x^r*e + 32*b*d^3*x^2*log(c) + 144*b*r*x^2*x^(3*r)*e^3*log(c) + 96*b*d*x^2*x^(2*r)*e^2*log(c) + 32*
b*n*x^2*x^(3*r)*e^3*log(x) + 32*a*d^3*x^2 - 16*b*n*x^2*x^(3*r)*e^3 + 144*a*r*x^2*x^(3*r)*e^3 + 96*a*d*x^2*x^(2
*r)*e^2 + 32*b*x^2*x^(3*r)*e^3*log(c) + 32*a*x^2*x^(3*r)*e^3)/(9*r^6 + 66*r^5 + 193*r^4 + 288*r^3 + 232*r^2 +
96*r + 16)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x\,{\left (d+e\,x^r\right )}^3\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(d + e*x^r)^3*(a + b*log(c*x^n)),x)

[Out]

int(x*(d + e*x^r)^3*(a + b*log(c*x^n)), x)

________________________________________________________________________________________